package com.jtech.together.model;

import cn.bmob.newim.bean.BmobIMExtraMessage;
import cn.bmob.newim.bean.BmobIMMessage;

/**
 * 删除好友消息
 * Created by wuxubaiyang on 2017/5/13.
 */

public class DeleteFriendMessage extends BmobIMExtraMessage {
    public static final String MESSAGE_TYPE_DELETE_FRIEND = "delete";

    @Override
    public String getMsgType() {
        //设置消息类型为删除好友
        return MESSAGE_TYPE_DELETE_FRIEND;
    }

    @Override
    public boolean isTransient() {
        //设置为暂态消息，不存储到本地
        return true;
    }

    /**
     * 判断是否为删除好友的消息
     *
     * @param imMessage
     * @return
     */
    public static boolean isDeleteFriend(BmobIMMessage imMessage) {
        return MESSAGE_TYPE_DELETE_FRIEND.equals(imMessage.getMsgType());
    }
}